package com.qf.listener;

import com.qf.pojo.UserMsg;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

//@Component
//@RocketMQMessageListener(topic = "test",consumerGroup = "rocket-con-group1",consumeMode = ConsumeMode.ORDERLY)
public class RocketMQConsumer4 implements RocketMQListener<UserMsg> {
    @Override
    public void onMessage(UserMsg message) {

        Integer keys = message.getId();
        String tags = message.getTag();
        String s = message.getMsg();


        System.out.println("con4===key:" + keys +"--tags:" + tags + "--msg:" + s);

    }
}
